<template>
  <div>
    <h3>child组件</h3>
    <!-- <showphone :phone="childPhone" /> -->
    <showphone :attrs="attrs" />
    <!-- <showphone v-bind="{ ...$attrs }" /> -->
  </div>
</template>

<script>
import showphone from './showphone.vue'
export default {
  components: {
    showphone
  },
  // props: ['phone'],
  data() {
    return {
      attrs: {}
    }
  },
  created() {
    // this.childPhone = 'abc ---' + this.phone
    this.attrs = { ...this.$attrs, phone: 'abc ---' + this.$attrs.phone }
  }
}
</script>

<style lang="scss" scoped></style>
